const koa = require("koa");
const bodyParser = require("koa-bodyparser");
const registerRouters = require("../router");
// const userRouter = require("../router/user.router");
// const loginRouter = require("../router/login.router");

// 创建app
const app = new koa();

// 对app使用中间件
app.use(bodyParser());
registerRouters(app);
// app.use(userRouter.routes());
// app.use(userRouter.allowedMethods());
// app.use(loginRouter.routes());
// app.use(loginRouter.allowedMethods());

module.exports = app;
